package com.allwees.bs.module.wms.mq.listener;

import com.allwees.bs.module.scm.bo.EnteredWarehouseBo;
import com.allwees.bs.module.wms.service.WmsAllocateOrderSkuService;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(queues = "q.SCM_WMS.ShippingOrderSku.EnteredWarehouse")
public class EnteredWarehouseMqListener {

    @Autowired
    private WmsAllocateOrderSkuService allocateOrderSkuService;

    @RabbitHandler
    public void onEvent(EnteredWarehouseBo enteredWarehouseBo) {
        allocateOrderSkuService.create(enteredWarehouseBo);
    }
}
